<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 必须按照这个顺序写 L  V H   A */

        /* 没有被点击过 */
        a:link{
            color: red;
        }
        /* 被点过了 */
        a:visited{
            color: green;
        }
        /* 鼠标移上去 */
        a:hover{
            color: orange;
        }
        /* 鼠标按住没松开 */
        a:active{
            color: blue;
        }

        .box{
            width: 100px;
            height: 100px;
            background-color: khaki;
        }
        .box:hover{
            background-color: red;
        }
    </style>
</head>
<body>
    <a href="https://www.baidu.com">百度一下</a>
    <div class="box"></div>
</body>
</html>